#if !defined(AFX_DIMEDITCTRL_H__8BECDDFE_9173_4251_973F_A0859B65D8CC__INCLUDED_)
#define AFX_DIMEDITCTRL_H__8BECDDFE_9173_4251_973F_A0859B65D8CC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DimEditCtrl.h : header file
//

//#include "SecEdit.h"
static  const   int     DIM_TEXT_LEN =  128; 
/////////////////////////////////////////////////////////////////////////////
// CDimEditCtrl window

class CDimEditCtrl : public CEdit
{
// Construction
public:
	CDimEditCtrl();
//	friend class CSecEdit;

// Attributes
public:
	void    SetShowDimControl( bool bShow );                // Show Or Hide The Dim Control
    void    SetDimText( LPCTSTR cpText );                   // Set The Dim Text
    void    SetDimColor( COLORREF crDColor );               // Set The Dim Color
    void    SetDimOffset( char cRedOS, char cGreenOS,
                          char cBlueOS );                           // Set The Dim Color Offset

// Operations
public:
    virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID, CCreateContext *pContext = NULL);
protected:
    virtual void PreSubclassWindow();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDimEditCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDimEditCtrl();

	// Generated message map functions
protected:
	//{{AFX_MSG(CDimEditCtrl)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	   //{{AFX_MSG(CDimEditCtrl)
    afx_msg BOOL OnChange();
    afx_msg BOOL OnSetfocus();
    afx_msg void OnPaint();
    afx_msg BOOL OnEraseBkgnd(CDC *pDC);
    afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection);
    afx_msg BOOL OnKillfocus();
	afx_msg LRESULT OnContextMenu(WPARAM wlparam,LPARAM lparam);
	afx_msg LRESULT OnUndo(WPARAM wlparam,LPARAM lparam);
	afx_msg LRESULT OnClear(WPARAM wlparam,LPARAM lparam);
	afx_msg LRESULT OnCopy(WPARAM wlparam,LPARAM lparam);
	afx_msg LRESULT OnCut(WPARAM wlparam,LPARAM lparam);
	afx_msg LRESULT OnPaste(WPARAM wlparam,LPARAM lparam);
	afx_msg VOID OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg VOID OnLButtonDown(UINT nFlags, CPoint point);
    //}}AFX_MSG
     

	DECLARE_MESSAGE_MAP()

	void        DrawDimText( void );                        // Draw The Dim Text
	
    COLORREF    m_crDimTextColor;                           // "Hard" Dim Text Color
    TCHAR       m_caDimText[ DIM_TEXT_LEN + 1 ];            // Dim Text Buffer
    bool        m_bShowDimText;                             // Are We Showing The Dim Text?
    bool        m_bUseDimOffset;                            // Are We Using The Offset Colors (Not Hard Color)?
    char        m_cRedOS;                                   // Red Color Dim Offset
    char        m_cGreenOS;                                 // Green Color Dim Offset
    char        m_cBlueOS;                                  // Blue Color Dim Offset
    int         m_iDimTextLen;                              // Length Of Dim Text
	CFont       m_textFont;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DIMEDITCTRL_H__8BECDDFE_9173_4251_973F_A0859B65D8CC__INCLUDED_)
